
<?php
$config = Yii::app()->params['upload'];
$yes_or_no = array(
    0 => Yii::t('common', 'no'),
    1 => Yii::t('common', 'yes'),
);
?>
<div>
    <?php echo CHtml::beginForm(array('upload'), 'post', array('class' => 'dot_form')); ?>
    <fieldset>
        <legend><?php echo Yii::t('common', 'please_fill_table_contents'); ?></legend>
        <dl>
            <dt><?php echo Yii::t('setting', 'upload_setting_album'); ?></dt>
            <dd>
                <?php echo Yii::t('setting', 'width'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_album_width', $config['thumbnail_album_width'], array('class' => 'num')); ?>
                <span class="split">px</span>
                <?php echo Yii::t('setting', 'height'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_album_height', $config['thumbnail_album_height'], array('class' => 'num')); ?>
                <span class="split">px</span>
            </dd>
            
            <dt><?php echo Yii::t('setting', 'upload_setting_personnel'); ?></dt>
            <dd>
                <?php echo Yii::t('setting', 'width'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_personnel_width', $config['thumbnail_personnel_width'], array('class' => 'num')); ?>
                <span class="split">px</span>
                <?php echo Yii::t('setting', 'height'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_personnel_height', $config['thumbnail_personnel_height'], array('class' => 'num')); ?>
                <span class="split">px</span>
            </dd>
            
            <dt><?php echo Yii::t('setting', 'upload_setting_case'); ?></dt>
            <dd>
                <?php echo Yii::t('setting', 'width'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_case_width', $config['thumbnail_case_width'], array('class' => 'num')); ?>
                <span class="split">px</span>
                <?php echo Yii::t('setting', 'height'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_case_height', $config['thumbnail_case_height'], array('class' => 'num')); ?>
                <span class="split">px</span>
            </dd>
            
            <dt><?php echo Yii::t('setting', 'upload_setting_product'); ?></dt>
            <dd>
                <?php echo Yii::t('setting', 'width'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_product_width', $config['thumbnail_product_width'], array('class' => 'num')); ?>
                <span class="split">px</span>
                <?php echo Yii::t('setting', 'height'); ?><span class="split"></span><?php echo CHtml::textField('thumbnail_product_height', $config['thumbnail_product_height'], array('class' => 'num')); ?>
                <span class="split">px</span>
            </dd>

            <dt>生成缩略图：</dt>
            <dd><?php echo CHtml::dropDownList('generate_thumbnail', $config['generate_thumbnail'], $yes_or_no); ?></dd>

            <dt>缩略图大小：</dt>
            <dd>
                W：<?php echo CHtml::textField('thumbnail_width', $config['thumbnail_width'], array('class' => 'num')); ?>
                &nbsp;px&nbsp;
                H：<?php echo CHtml::textField('thumbnail_height', $config['thumbnail_height'], array('class' => 'num')); ?>
                &nbsp;px
            </dd>

            <dt>添加水印：</dt>
            <dd><?php echo CHtml::dropDownList('add_watermark', $config['add_watermark'], $yes_or_no); ?></dd>

            <dt>水印图片：</dt>
            <dd><?php echo CHtml::textField('watermark_picture_path', $config['watermark_picture_path'], array('class' => 'large')); ?></dd>
            
            <dt></dt>
            <dd><?php echo CHtml::submitButton(Yii::t('common', 'update'), array('name' => 'submit_setting', 'class' => 'btn')); ?></dd>
        </dl>
    </fieldset>
    <?php echo CHtml::endForm(); ?>
</div>